<template>
    <!-- <Form ref="formValidate" :model="formValidate" :rules="ruleValidate"> -->
    <Form ref="formValidate" :model="formValidate" :rules="ruleValidate">
        <FormItem prop="name">
            <Input v-model="formValidate.name" placeholder="填写单位名称"></Input>
            <input v-model="formValidate.name" placeholder='填写单位名称'/>
        </FormItem>

        <!-- <FormItem>
            <Button type="primary" @click="handleSubmit('formValidate')">Submit</Button>
            <Button @click="handleReset('formValidate')" style="margin-left: 8px">Reset</Button>
        </FormItem> -->
    </Form>
</template>
<script>
    export default {
        data () {
            return {
                formValidate: {
                    name: '',

                },
                ruleValidate: {
                    name: [
                        { required: true, message: "单位名称不能为空", trigger: "blur" },
                    ],
                }
            }
        },
        methods: {
            handleSubmit (name) {
                this.$refs[name].validate((valid) => {
                    if (valid) {
                        this.$Message.success('Success!');
                    } else {
                        this.$Message.error('Fail!');
                    }
                })
            },
            handleReset (name) {
                this.$refs[name].resetFields();
            }
        }
    }</script>
